package org.huangrui.javase.api;

import org.junit.Test;

/**
 * @Author hr
 * @Create 2025-11-07 13:29
 **/
public class T09StringBlock {
    @Test
    public void test1(){
        String htmlStr = "<html>\n" +
                "    <body>\n" +
                "        <p>Hello, 尚硅谷</p>\n" +
                "    </body>\n" +
                "</html>\n";
        System.out.println(htmlStr);

        String story = "Elly said,\"Maybe I was a bird in another life.\"\n" +
                "Noah said,\"If you're a bird , I'm a bird.\";";
        System.out.println(story);
    }
    @Test
    public void test2() {
        String htmlStr = """
            <html>
              <body>
                  <p>Hello, world</p>
              </body>
            </html>
            """;
        System.out.println(htmlStr);

        String story = """
           Elly said,"Maybe I was a bird in another life."
           Noah said,"If you're a bird , I'm a bird."
           """;
        System.out.println(story);

        String text = """
            \s\s人最宝贵的东西是生命，生命对人来说只有一次。\
            因此，人的一生应当这样度过：当一个人回首往事时，\
            不因虚度年华而悔恨，也不因碌碌无为而羞愧；\
            这样，在他临死的时候，能够说，\
            我把整个生命和全部精力都献给了人生最宝贵的事业\
            ——为人类的解放而奋斗。
            """;
        System.out.println(text);
    }
}
